package cc.ilzy.mall.model.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author ilzy
 * @since 2025-07-09
 */
@Getter
@Setter
@ToString
@TableName("product")
@Accessors(chain = true)
@ApiModel(value = "Product对象", description = "")
public class Product implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    /**
     * 标题
     */
    @TableField("title")
    @ApiModelProperty("标题")
    private String title;

    /**
     * 封面图
     */
    @ApiModelProperty("封面图")
    @TableField("cover_img")
    private String coverImg;

    /**
     * 详情
     */
    @TableField("detail")
    @ApiModelProperty("详情")
    private String detail;

    /**
     * 老价格
     */
    @ApiModelProperty("老价格")
    @TableField("old_amount")
    private BigDecimal oldAmount;

    /**
     * 新价格
     */
    @TableField("amount")
    @ApiModelProperty("新价格")
    private BigDecimal amount;

    /**
     * 库存
     */
    @TableField("stock")
    @ApiModelProperty("库存")
    private Integer stock;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 锁定库存
     */
    @ApiModelProperty("锁定库存")
    @TableField("lock_stock")
    private Integer lockStock;
}
